import request from '@/utils/request'

// 获取视察视察单列表

export function getUnitList(data) {
  return request({
    url: '/system/leadervisit/list',
    method: 'post',
    data
  })
}

// 查看视察视察单详情
export function getUnitListByPage(params) {
  return request({
    url: '/system/leadervisit/detail',
    method: 'post',
    params
  })
}

// 编辑视察视察单
export function updateUnitList(data) {
  return request({
    url: '/system/leadervisit/edit',
    method: 'post',
    data
  })
}

// 删除视察视察单
export function deleteUnitList(params) {
  return request({
    url: '/system/leadervisit/delete',
    method: 'post',
    params
  })
}

// 上传视察视察单
export function uploadUnitList(data) {
  return request({
    url: '/system/leadervisit/importform',
    method: 'post',
    data
  })
}

// 导出网点视察单模板
export function exportUnitTemplate(data) {
  return request({
    url: '/system/leadervisit/exportformtemplate',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

// 导出网点视察单
export function exportUnitList(data) {
  return request({
    url: '/system/leadervisit/exportformlist',
    method: 'post',
    data,
    responseType: 'blob'
  })
}

// 统计列表
export function getUnitListStatistics(data) {
  return request({
    url: '/system/leadervisit/statistic',
    method: 'post',
    data
  })
}

// 导出统计列表
export function exportUnitListStatistics(data) {
  return request({
    url: '/system/leadervisit/statisticexport',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
